myApp_.onPageInit('goods_detail', function (page) {
    GOODS_DETAIL.request(GOODS_DETAIL.goods_id);
    GOODS_DETAIL.goods_id = '';
    GOODS_DETAIL.lunbo();
});
GOODS_DETAIL = {};
GOODS_DETAIL.goods_id = '';

GOODS_DETAIL.data = {};
GOODS_DETAIL.lunbo=function(){ 
	var myApp_ = new Framework7();
	var mySwiper = myApp_.swiper('.swiper-container', {
		pagination: '.swiper-pagination'
	});
}

GOODS_DETAIL.__INIT__ = function (id) {
    GOODS_DETAIL.goods_id = id; 
    GOODS_DETAIL.request();
}


GOODS_DETAIL.request = function () {
    if(!GOODS_DETAIL.goods_id){
        return;
    }
    request_(
        url_('api/V1/good')
        , {
            goods_id: GOODS_DETAIL.goods_id,
            community_id: SESSION.get_community_id()
        }
        , function (d) {
            if (d.code == 0) {
                GOODS_DETAIL.data = d.data;
                GOODS_DETAIL.fill();
            } else {
                my_tips_(d.msg);
			    clear_hash();
            }
        }
    );

}

GOODS_DETAIL.fill = function ( ) {
    var context = GOODS_DETAIL.data;  
    mainView.router.load({
        url: "src/index/goods/goods_detail.html",
        context:context
    });
}

GOODS_DETAIL.tpl = '';